# coding=utf-8
class Person():
    def __init__(self, name, age):
        self.name = name
        self.age = age


@staticmethod
def staticfunc():
    print("---static method---")


# 动态给类添加静态方法
Person.staticfunc = staticfunc
Person.staticfunc()


@classmethod
def clsfunc(cls):
    print('---cls method---')


# 动态给类添加类方法
Person.clsfunc = clsfunc
Person.clsfunc()

# 动态给类添加属性
Person.sorce = 100
